package com.qyhl.party.party.study;

import com.qyhl.webtv.commonlib.entity.act.Catalog;
import com.qyhl.webtv.commonlib.entity.news.NewsBean;
import com.qyhl.webtv.commonlib.entity.news.PartyBuildConfigBean;

import java.util.List;

public class PartyStudyPresenter implements PartyStudyContract.PartyStudyPresenter {
    private PartyStudyContract.PartyStudyView mView;
    private PartyStudyModel mModel;

    public PartyStudyPresenter(PartyStudyContract.PartyStudyView mView) {
        this.mView = mView;
        this.mModel = new PartyStudyModel(this);
    }

    @Override
    public void getConfig() {
        mModel.getConfig();
    }

    @Override
    public void getConfigInfo(String catalogId, int position) {
        mModel.getConfigInfo(catalogId, position);
    }

    @Override
    public void getList(String InnerCode, int position) {
        mModel.getList(InnerCode, position);
    }

    @Override
    public void setConfig(List<PartyBuildConfigBean> beanList) {
        mView.setConfig(beanList);
    }

    @Override
    public void setInfo(Catalog bean, int position) {
        mView.setInfo(bean, position);
    }

    @Override
    public void setList(List<NewsBean> beanList, int position) {
        mView.setList(beanList, position);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }
}
